<%--
  Created by Jerry
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="cs" />
<meta name="robots" content="all,follow" />

<title>ProjectBox</title>
<meta name="description" content="..." />
<meta name="keywords" content="..." />

<!--  <link rel="index" href="./" title="Home" /> -->
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="<c:url value='/css/main.css' />" />
<link rel="stylesheet" media="print" type="text/css"
	href="<c:url value='/css/print.css' />" />
<link rel="stylesheet" media="aural" type="text/css"
	href="<c:url value='/css/aural.css' />" />
<link rel="stylesheet" type="text/css"
	href="<c:url value='/css/button.css' />" />
<link rel="stylesheet" type="text/css" href="<c:url value='/css/viewresource.css'/>"/>
<title>ProjectBox</title>
<script type="text/javascript">

function emptyTopSearchBox() {
	
	document.getElementById("search-input").value = "";
}

</script>
</head>

<body>

<!-- Main -->
<div id="main" class="box">

    <!-- Header -->
    <div id="header">

        <!-- Logotyp -->
        <img alt="" src="<c:url value='/design/logo.png'/>" class="logo" />
		<hr class="noscreen" />

        <!-- Quick links -->
        <div class="noscreen noprint">
			<p>
				<em>Quick links: <a href="#content">content</a>, <a
					href="#tabs">navigation</a>, <a href="#search">search</a>.</em>
			</p>
			<hr />
		</div>
       
        <!-- Search -->
			<div id="search" class="noprint">
				<form action="<c:url value='/admin/projects/search'/>" method="GET">
					<fieldset>
						<legend>Search</legend>
						<label><span class="noscreen">Find:</span> <span
							id="search-input-out"><input type="text"
								id="search-input" name="searchString" size="30" placeholder="Search Projects" onclick="javascript:emptyTopSearchBox()"/> </span> </label> 
								<input type="image"  src="<c:url value='/design/search_submit.gif' />" id="search-submit" ALT="Submit Form" border="0" value=”Submit”/>
					</fieldset>
				</form>
			</div>
			<!-- /search -->
			
    </div> <!-- /header -->

     <!-- Main menu (tabs) -->
     <div id="tabs" class="noprint">

            <h3 class="noscreen">Navigation</h3>
            
            <ul class="box">
				<li><a href="<c:url value='/admin/announcement'/>">Announcements<span
						class="tab-l"></span><span class="tab-r"></span>
				</a>
				</li>
				<!-- Active -->
				<li id="active"><a href="<c:url value='/admin/users'/>">Users<span
						class="tab-l"></span><span class="tab-r"></span>
				</a>
				</li>
				<li><a href="<c:url value='/admin/projects'/>">Projects<span
						class="tab-l"></span><span class="tab-r"></span>
				</a>
				</li>
				<li><a href="<c:url value='/admin/rule'/>">Rule<span class="tab-l"></span><span
						class="tab-r"></span>
				</a>
				</li>
			</ul>
			
			<div class="f-right"
				style="margin-right: 20px; margin-bottom: 20px; font-weight: bold; color: #FF9000;">
				Hi, ${currentUser.firstName} ${currentUser.lastName} | <a
					href="<c:url value='/logout' />" >Logout</a>
			</div>
            
        <hr class="noscreen" />
     </div> <!-- /tabs -->

    <!-- Page (2 columns) -->
    <div id="page" class="box">
    <div id="page-in" class="box">

		<!-- /strip -->

        <!-- Content -->
        <div id="content">	
            
            <!-- Projects -->
            <div class="article">
						<h2>
							<span>ProjectBox User</span>
						</h2>
						
						<c:choose>
            				<c:when test="${users != null}">
            				<c:forEach var="user" items="${users}" varStatus="counter">
							<table style="border: hidden">

								<tbody>
								

									<tr>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px"><label
											for="fname">First Name:</label>
										</td>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px">

											<label>${user.firstName}</label></td>
										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px"><label
											for="lname">Last Name:</label>
										</td>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px">

											<label>${user.lastName}</label>
										</td>

									</tr>
									<tr>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px"><label
											for="email">Email:</label>
										</td>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px">

											<label><a href="mailto:${user.username}">${user.username}</a></label>
										</td>

									</tr>
									
									<tr>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px"><label
											for="email">Status:</label>
										</td>

										<td
											style="padding-top: 8px; border-right: hidden; border-bottom: hidden; padding-left: 10px">

											
												<c:choose>
												<c:when test="${user.enabled}">
													<label style="color:green"><b>Active</b></label>
												</c:when>
												<c:otherwise>
													<label style="color:red"><b>Inactive</b></label>
												</c:otherwise>
												</c:choose>
											
										</td>

									</tr>
								</tbody>

							</table>
									<a href="<c:url value='/admin/users/${user.id}/projects' />"><input type="submit" class="obutton" name="viewProject" value="View Projects" /></a>
									<c:choose>
									<c:when test="${user.enabled}">
										<a href="<c:url value='/admin/users/${user.id}/disable' />"><input type="submit" class="obutton" name="disable" value="Disable" /></a>
									</c:when>
									<c:otherwise>
										<a href="<c:url value='/admin/users/${user.id}/enable' />"><input type="submit" class="obutton" name="enable" value="Enable" /></a>
									</c:otherwise>
									</c:choose>
							<hr>
							</c:forEach>            				
            				</c:when>
            				</c:choose>
						
					</div>

					<!-- /projects -->

					<hr class="noscreen" />
        </div> <!-- /content -->

    </div> <!-- /page-in -->
    </div> <!-- /page -->

	<!-- Footer -->
	<div id="footer">
		<div id="top" class="noprint">
			<p>
				<span class="noscreen">Back on top</span> 
				<a href="#header"
					title="Back on top ^">^<span></span>
				</a>
			</p>
		</div>

		<hr class="noscreen" />
		<p id="copyright">
			&copy; 2012 
			<a href="mailto:mss.projectbox@gmail.com">ProjectBox Team</a>
		</p>
	</div> <!-- /footer -->

</div> <!-- /main -->

</body>
</html>